<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;

// Create a shortcut for params.
$params = &$this->item->params;
$images = json_decode($this->item->images);
$canEdit = $this->item->params->get('access-edit');
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.framework');
?>

<?php if ($this->item->state == 0) : ?>
  <div class="system-unpublished">
  <?php endif; ?>
  <fieldset class="fdichvu">
    <?php if ($params->get('show_title')) : ?>
      <legend>
        <h2>
          <?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
            <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
              <?php echo $this->escape($this->item->title); ?></a>
          <?php else : ?>
            <?php echo $this->escape($this->item->title); ?>
          <?php endif; ?>
        </h2>
      </legend>
    <?php endif; ?>
    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
      <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
      <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
        <img
        <?php
        if ($images->image_intro_caption):
          echo 'class="caption"' . ' title="' . htmlspecialchars($images->image_intro_caption) . '"';
        endif;
        ?>
          src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>

      </div>
    <?php endif; ?>
  </fieldset>
  <div class="item-separator"></div>
  <?php echo $this->item->event->afterDisplayContent; ?>
